<!DOCTYPE html>
<html lang="zh"  xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  <title>后台首页 - 后台管理系统</title>
  <link href="/bbs/static/admin/css/bootstrap.min.css" rel="stylesheet">
  <link href="/bbs/static/admin/css/materialdesignicons.min.css" rel="stylesheet">
  <link href="/bbs/static/admin/css/style.min.css" rel="stylesheet">
<body>
<div class="lyear-layout-web">
  <div class="lyear-layout-container">
    <!--头部信息-->
    <div th:insert="~{admin/aside :: header1}"></div>
    <!--End 头部信息-->

    <!--左侧导航-->
    <div th:insert="~{admin/aside :: aside}"></div>
    <!--End 左侧导航-->

    <!--页面主要内容-->
    <main class="lyear-layout-content">
      <div class="container-fluid">

        <div class="row">
          <div class="col-lg-12">
            <div class="card">
              <div class="card-toolbar clearfix">
                <form class="pull-right search-bar" method="get" th:action="@{/admin/getUsers}" role="form">
                  <div class="input-group">
                    <input type="text" class="form-control" value="" name="key" placeholder="请输入名称">
                    <input type="submit" class="form-control" value="搜索">
                  </div>
                </form>
                <div class="toolbar-btn-action">
                  <a class="btn btn-primary m-r-5" th:href="@{/admin/toAdd}"><i class="mdi mdi-plus"></i> 新增</a>
                  <a class="btn danger m-r-5" th:href="@{/admin/export}"><i class="mdi mdi-plus"></i> 导出到excel</a>
                </div>
              </div>
              <div class="card-body">

                <div class="table-responsive">
                  <table class="table table-bordered">
                    <thead>
                    <tr>
                      <th>编号</th>
                      <th>用户名</th>
                      <th>密码</th>
                      <th>邮箱</th>
                      <th>性别</th>
                      <th>注册时间</th>
                      <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="user:${userPageInfo.list}">
                      <td th:text="${user.id}"></td>
                      <td th:text="${user.name}"></td>
                      <td th:text="${user.password}"></td>
                      <td th:text="${user.email}"></td>
                      <td th:text="${user.sex}"></td>
                      <td th:text="${user.regedit_time}"></td>
                      <td>
                        <div class="btn-group">
                          <a class="btn btn-xs btn-default" th:href="@{'/admin/toEdit?pageNo='+${userPageInfo.pageNum}+'&key='+${key}+'&id='+${user.id}}" title="编辑" data-toggle="tooltip"><i class="mdi mdi-pencil"></i></a>
                          <a class="btn btn-xs btn-default" th:href="@{'/admin/delete?pageNo='+${userPageInfo.pageNum}+'&key='+${key}+'&id='+${user.id}}" title="删除" data-toggle="tooltip"><i class="mdi mdi-window-close"></i></a>
                        </div>
                      </td>
                    </tr>
                    </tbody>
                  </table>
                </div>
                <ul class="pagination">
                  <li><a th:href="@{'/admin/getUsers?pageNo=1'+'&key='+${key}}"><span>首页</span></a></li>

                  <li><a th:href="@{'/admin/getUsers?pageNo='+${userPageInfo.prePage}+'&key='+${key}}"><span>«</span></a></li>

                  <li th:each="i:${userPageInfo.navigatepageNums}" th:class="${userPageInfo.pageNum==i}?'active': '' ">
                    <a th:href="@{'/admin/getUsers?pageNo='+${i}+'&key='+${key}}" th:text="${i}"></a>
                  </li>

                  <li><a th:href="@{'/admin/getUsers?pageNo='+${userPageInfo.nextPage}+'&key='+${key}}"><span>»</span></a></li>
                  <li><a th:href="@{'/admin/getUsers?pageNo='+${userPageInfo.pages}+'&key='+${key}}"><span>尾页</span></a></li>

                </ul>

              </div>
            </div>
          </div>

        </div>

      </div>
    </main>
    <!--End 页面主要内容-->
  </div>
</div>
<script type="text/javascript" src="/bbs/static/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="/bbs/static/admin/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/bbs/static/admin/js/perfect-scrollbar.min.js"></script>
<script type="text/javascript" src="/bbs/static/admin/js/main.min.js"></script>
<script src="/bbs/static/admin/js/lightyear.js"></script>
</body>
</html>